package com.jt.project;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.function.Consumer;

public class LambdaTests {
    public static void main(String[] args) {
        List<String> list = Arrays.asList("A", "B", "C");
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }

        Iterator<String> iterator = list.iterator();
        while (iterator.hasNext()){
            String next = iterator.next();
            System.out.println(next);
        }

        list.forEach(System.out::println);
    }
}
